<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Gantt_chart_c extends CI_Controller {

    function __construct() {
        parent::__construct();
        $this->load->model('gantt_chart_m');
    }

    function index() {
        $data['content'] = 'pages/gantt_chart';
        $data['title'] = 'Gantt Chart';
        $data['current_page'] = 'gantt-chart';
        $data['class'] = '';
        $this->load->view('includes/gt-template', $data);
    }
       function gantt_details(){
        $query = $this->gantt_chart_m->get_gantt_details($this->input->post("event-id"));
        //$data;
        foreach($query->result()as $row){
            
            $data = array('gantt_name'=>$row->event_name,
                'gantt_start'=>$row->start_date,
                'gantt_end'=>$row->end_date);
        }
        echo json_encode($data);
    }

}

/* End of file gantt_chart_c.php */
